from paddlers.deploy import Predictor


class Extract:
    def __init__(self):
        self.predictor = Predictor("./model/extract", use_gpu=True)

    def forward(self, img1):
        res = self.predictor.predict(img1)
        return res['label_map']*255
